Integrate all estimators#1
Conversation
Single consolidated data source, two model folders, bednet->dn0 ported from minte. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
absternator
left a comment
There was a problem hiding this comment.
Nice works looks very good having it all here. just left ya some comments. Also thank you for the tests they are very helpfull.
If anything may take too long dw about it now can clean up later
-
Q - have you tried a local build and see its working?
-
For a python project having a
src/estimintfolder is a bit odd. if its easy id remove the src outer folder... so then you can do easy module runs likepython -m estimint. plotting -
models folder shoud probs be in estimint folder
-
noticed a decent amount of unused imports can those be cleanup up please
-
is train.py in src/estimint old now? thus deletable?
|
|
||
| scenarios = [ | ||
| dict(name="PBO nets, prevalence input, 60% more mosquitoes", | ||
| input="prevalence", value=0.30, |
There was a problem hiding this comment.
why is input param needed? how would mint web call this?
| if not _MODELS: | ||
| _MODELS["prevalence"] = load_xgb_model("prevalence") | ||
| _MODELS["hbr"] = load_xgb_model("hbr") | ||
| return _MODELS |
There was a problem hiding this comment.
may as well add the other one "eir_to_hbr". and then when estimate_eir_with_mosquito_delta is called can get passed into it
| delta = scn.get("mosquito_delta") | ||
| if delta is not None and mode == "prevalence": | ||
| r = estimate_eir_with_mosquito_delta(prevalence=value, mosquito_delta=delta, **feats) | ||
| eir_final, hbr_baseline, hbr_new = r["eir_new"], r["hbr_baseline"], r["hbr_new"] |
There was a problem hiding this comment.
if mode is prevalence on line 65 thats a wasted run. beacuse it dosent get used. we actually should get eir baseline from here. so this should come first before that as an if statemebt value
| cov = dict(eir=eir_final, dn0_use=dn0_use, dn0_future=dn0_use, Q0=Q0, phi_bednets=phi, | ||
| seasonal=seasonal, routine=0.0, itn_use=itn_use, irs_use=irs_use, | ||
| itn_future=itn_use, irs_future=irs_use, lsm=lsm) | ||
| row = dict(name=scn.get("name"), input_mode=mode, net=net or "none", |
There was a problem hiding this comment.
this row return needed? its not used at all
|
can you also please make the variable names a bit more descreptive. its hard for me to follow code because of naming please |
| ) -> pd.DataFrame: | ||
| """Run scenarios end-to-end (estiMINT EIR -> stateMINT emulator) -> DataFrame. | ||
|
|
||
| Each scenario: input ("prevalence"|"hbr"|"eir") + value; Q0, phi_bednets, seasonal, |
There was a problem hiding this comment.
the input param as stated is a bit odd since its the full pipeline run... if you think people will use full pipeline with hbr, eir then leave. else just default to all being prevalence (hence removing it and cleanup if statements)
The publish workflow bumped pyproject.toml to 1.4.3 then 1.4.4 without regenerating the lockfile, so uv.lock still pinned estimint 1.4.2. CI runs `uv sync --locked`, which aborts when the lockfile is stale -- failing the tests job before any test could run. Regenerated with the CI-pinned uv 0.11.18. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the manual "verbump" edit (which bumped pyproject.toml but left uv.lock stale, breaking `uv sync --locked` in CI). The script runs `uv version --bump`, which rewrites pyproject.toml and uv.lock together, then commits and tags. Pushing the tag stays a manual step since it triggers the irreversible PyPI publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rity and structure
…ate scenarios to use new structure
estiMINT v1.4.0 — integrate all estimators
prevalence to EIRHBR to/from EIRbednet to dn0bednet to dn0mapping fromminte(calculate_dn0,net_types)datasets/estimint_simulations_y9.parquet) built from the raw DuckDBs viamodels/consolidate.pymodels/prevalence,models/hbr); removedoutput/and the oldscripts/pyarrow,scipy1.3.1 to 1.4.0